package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingProject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NursingProjectMapper {
    /**
     * 条件分页查询
     * @param name String
     * @param status int
     * @return Page<NursingProject>
     */
    Page<NursingProject> selectByNameAndStatus(@Param("name") String name,@Param("status") Integer status);

    /**
     * 根据名称查询项目记录
     * @param name String
     * @return NursingProject
     */
    NursingProject selectByName(String name);

    /**
     * 插入项目记录
     * @param nursingProject NursingProjectMapper
     */
    void insert(NursingProject nursingProject);

    /**
     * 根据id查询项目记录
     * @param id Long
     * @return NursingProject
     */
    NursingProject selectById(Long id);

    /**
     * 更新护理项目
     * @param nursingProject NursingProject
     */
    void update(NursingProject nursingProject);

    /**
     * 根据id删除项目
     * @param id Long
     */
    void delete(Long id);

    /**
     * 查询所有项目
     * @return List<NursingProject>
     */
    List<NursingProject> selectAll();
}
